home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 January / PC Plus Super CD No55a (PCP-147A-1-99) (Disc 1) (1998).iso / linux / developers / visualtcl / windows / vtcl / lib / globals.tcl < prev    next >
Encoding:
Text File  |  1997-10-23  |  17.6 KB  |  432 lines

  1. ##############################################################################
  2. # $Id: globals.tcl,v 1.25 1997/10/24 01:47:40 stewart Exp $
  3. #
  4. # globals.tcl - global variables
  5. #
  6. # Copyright (C) 1996-1997 Stewart Allen
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License
  10. # as published by the Free Software Foundation; either version 2
  11. # of the License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. ##############################################################################
  23. #
  24.  
  25. # widget data record format:
  26. # {type} {name} {alias} {option list} {manager record} {bind record} {child widget list}
  27.  
  28. # bind record format:
  29. # { {bindtag} {bind list record} }  ...
  30.  
  31. # bind list record format:
  32. # { {event} {command} } ...
  33.  
  34. # option list record format:
  35. # { {name} {value} } ...
  36.  
  37. # widget manager record format:
  38. # {type} {option list} {manager specific list}
  39.  
  40. global vTcl
  41.  
  42. set vTcl(action)         ""
  43. set vTcl(action_index)   -1
  44. set vTcl(action_limit)   -1
  45. set vTcl(balloon,first)  0
  46. set vTcl(balloon,set)    0
  47. set vTcl(balloon,soon)   0
  48. set vTcl(bind,ignore)    ""
  49. set vTcl(change)         0
  50. set vTcl(console)        0
  51. set vTcl(cursor,last)    ""
  52. set vTcl(procs)          "init main"
  53. set vTcl(file,base)      [pwd]
  54. set vTcl(file,mode)      ""
  55. set vTcl(file,type)      "*.tcl"
  56. set vTcl(grid,x)         5
  57. set vTcl(grid,y)         5
  58. set vTcl(gui,main)       ".vTcl"
  59. set vTcl(gui,ae)         "$vTcl(gui,main).ae"
  60. set vTcl(gui,command)    "$vTcl(gui,main).comm"
  61. set vTcl(gui,console)    "$vTcl(gui,main).con"
  62. set vTcl(gui,proc)       "$vTcl(gui,main).proc"
  63. set vTcl(gui,proclist)   "$vTcl(gui,main).proclist"
  64. set vTcl(gui,toplist)    "$vTcl(gui,main).toplist"
  65. set vTcl(gui,mgr)        "$vTcl(gui,main).mgr"
  66. set vTcl(gui,prefs)      "$vTcl(gui,main).prefs"
  67. set vTcl(gui,rc_menu)    "$vTcl(gui,main).rc"
  68. set vTcl(gui,varlist)    "$vTcl(gui,main).varlist"
  69. set vTcl(gui,statbar)    "$vTcl(gui,main).stat.f.bar"
  70. set vTcl(gui,showlist)   ".vTcl.mgr .vTcl.ae"
  71. set vTcl(h,exist)        no
  72. set vTcl(h,size)         3
  73. set vTcl(hide)           ""
  74. set vTcl(item_num)       1
  75. set vTcl(key,x)          1
  76. set vTcl(key,y)          1
  77. set vTcl(key,w)          1
  78. set vTcl(key,h)          1
  79. set vTcl(mgrs,update)    yes
  80. # preferences
  81. set vTcl(pr,attr_on)     1
  82. set vTcl(pr,balloon)     1
  83. set vTcl(pr,encase)      list
  84. set vTcl(pr,font_dlg)    ""
  85. set vTcl(pr,font_fixed)  ""
  86. set vTcl(pr,getname)     0
  87. set vTcl(pr,geom_on)     1
  88. set vTcl(pr,geom_comm)   "350x200"
  89. set vTcl(pr,geom_proc)   "500x400"
  90. set vTcl(pr,info_on)     1
  91. set vTcl(pr,manager)     place
  92. set vTcl(pr,shortname)   1
  93. set vTcl(pr,saveglob)    0
  94. set vTcl(pr,show_func)   1
  95. set vTcl(pr,show_var)    -1
  96. set vTcl(pr,show_top)    -1
  97. set vTcl(pr,winfocus)    0
  98. # end preferences
  99. set vTcl(proc,name)      ""
  100. set vTcl(proc,args)      ""
  101. set vTcl(proc,body)      ""
  102. set vTcl(proc,ignore)    "tcl.*|tk.*|auto_.*|bgerror|\\..*"
  103. set vTcl(project,name)   ""
  104. set vTcl(project,file)   ""
  105. set vTcl(quit)           1
  106. set vTcl(tool,list)      ""
  107. set vTcl(tool,last)      ""
  108. set vTcl(toolbar,width) 2
  109. set vTcl(tops)           ""
  110. set vTcl(undo)           ""
  111. set vTcl(vars)           ""
  112. set vTcl(var,name)       ""
  113. set vTcl(var,value)      ""
  114. set vTcl(var,ignore)     "vTcl.*|tix.*"
  115. set vTcl(var_update)     "yes"
  116. set vTcl(w,alias)        ""
  117. set vTcl(w,class)        ""
  118. set vTcl(w,def_mgr)      $vTcl(pr,manager)
  119. set vTcl(w,info)         ""
  120. set vTcl(w,insert)       .
  121. set vTcl(w,libs)         ""
  122. set vTcl(w,manager)      ""
  123. set vTcl(w,mgrs)         "grid pack place wm"
  124. set vTcl(w,options)      ""
  125. set vTcl(w,widget)       ""
  126. set vTcl(winname)        "vTclWindow"
  127. set vTcl(windows)        ".vTcl.toolbar .vTcl.mgr .vTcl.ae .vTcl.wstat
  128.                           .vTcl.proclist .vTcl.varlist .vTcl.toplist .vTcl.tree
  129.                           .vTcl.con .vTcl.prefs .vTcl.about .vTcl.bind"
  130. set vTcl(newtops)        1
  131. set vTcl(mode)           "EDIT"
  132. set vTcl(pwd)            [pwd]
  133. set vTcl(redo)           ""
  134. set vTcl(save)           ""
  135. set vTcl(tab)            "    "
  136. set vTcl(tab2)           "$vTcl(tab)$vTcl(tab)"
  137.  
  138. set vTcl(cmpd,list)      ""
  139. set vTcl(syscmpd,list)   ""
  140.  
  141. set vTcl(attr,tops)     "aspect command focusmodel geometry grid
  142.                          iconbitmap iconmask iconname iconposition
  143.                          iconwindow maxsize minsize overrideredirect
  144.                          resizable sizefrom state title"
  145.  
  146. set vTcl(attr,winfo)    "children class geometry height ismapped
  147.                          manager name parent rootx rooty toplevel
  148.                          width x y"
  149.  
  150. #
  151. # Default attributes to append on insert
  152. #
  153. set vTcl(grid,insert)   ""
  154. set vTcl(pack,insert)   ""
  155. set vTcl(place,insert)  "-x 5 -y 5 -bordermode ignore"
  156.  
  157. #
  158. # Geometry Manager Attributes       LabelName     Balloon  Type   Choices   CfgCmd     Group
  159. #
  160. set vTcl(m,pack,list) "-anchor -expand -fill -side -ipadx -ipady -padx -pady -in"
  161. set vTcl(m,pack,extlist) ""
  162. set vTcl(m,pack,-anchor)           { anchor          {}       choice  {n ne e se s sw w nw center} }
  163. set vTcl(m,pack,-expand)           { expand          {}       boolean {0 1} }
  164. set vTcl(m,pack,-fill)             { fill            {}       choice  {none x y both} }
  165. set vTcl(m,pack,-side)             { side            {}       choice  {top bottom left right} }
  166. set vTcl(m,pack,-ipadx)            { {int. x pad}    {}       type    {} }
  167. set vTcl(m,pack,-ipady)            { {int. y pad}    {}       type    {} }
  168. set vTcl(m,pack,-padx)             { {ext. x pad}    {}       type    {} }
  169. set vTcl(m,pack,-pady)             { {ext. y pad}    {}       type    {} }
  170. set vTcl(m,pack,-in)               { inside          {}       type    {} }
  171.  
  172. set vTcl(m,place,list) "-anchor -x -y -relx -rely -width -height -relwidth -relheight -in"
  173. set vTcl(m,place,extlist) ""
  174. set vTcl(m,place,-anchor)          { {anchor}        {}       choice  {n ne e se s sw w nw center} }
  175. set vTcl(m,place,-x)               { {x position}    {}       type    {} }
  176. set vTcl(m,place,-y)               { {y position}    {}       type    {} }
  177. set vTcl(m,place,-width)           { width           {}       type    {} }
  178. set vTcl(m,place,-height)          { height          {}       type    {} }
  179. set vTcl(m,place,-relx)            { {relative x}    {}       type    {} }
  180. set vTcl(m,place,-rely)            { {relative y}    {}       type    {} }
  181. set vTcl(m,place,-relwidth)        { {rel. width}    {}       type    {} }
  182. set vTcl(m,place,-relheight)       { {rel. height}   {}       type    {} }
  183. set vTcl(m,place,-in)              { inside          {}       type    {} }
  184.  
  185. set vTcl(m,grid,list) "-sticky -row -column -rowspan -columnspan -ipadx -ipady -padx -pady -in"
  186. set vTcl(m,grid,extlist) ""
  187. set vTcl(m,grid,-sticky)           { sticky          {}       type    {n s e w} }
  188. set vTcl(m,grid,-row)              { row             {}       type    {} }
  189. set vTcl(m,grid,-column)           { column          {}       type    {} }
  190. set vTcl(m,grid,-rowspan)          { {row span}      {}       type    {} }
  191. set vTcl(m,grid,-columnspan)       { {col span}      {}       type    {} }
  192. set vTcl(m,grid,-ipadx)            { {int. x pad}    {}       type    {} }
  193. set vTcl(m,grid,-ipady)            { {int. y pad}    {}       type    {} }
  194. set vTcl(m,grid,-padx)             { {ext. x pad}    {}       type    {} }
  195. set vTcl(m,grid,-pady)             { {ext. y pad}    {}       type    {} }
  196. set vTcl(m,grid,-in)               { inside          {}       type    {} }
  197.  
  198. set vTcl(m,grid,extlist) "row,weight column,weight row,minsize column,minsize"
  199. set vTcl(m,grid,column,weight)     { {col weight}    {}       type    {} {vTcl:grid:conf_ext} }
  200. set vTcl(m,grid,column,minsize)    { {col minsize}   {}       type    {} {vTcl:grid:conf_ext} }
  201. set vTcl(m,grid,row,weight)        { {row weight}    {}       type    {} {vTcl:grid:conf_ext} }
  202. set vTcl(m,grid,row,minsize)       { {row minsize}   {}       type    {} {vTcl:grid:conf_ext} }
  203.  
  204. set vTcl(m,wm,list) ""
  205. set vTcl(m,wm,extlist) "geometry,x geometry,y geometry,w geometry,h resizable,w resizable,h
  206.                         minsize,x minsize,y maxsize,x maxsize,y state title"
  207. set vTcl(m,wm,geometry,x)          { {x position}    {}       type    {} {vTcl:wm:conf_geom} }
  208. set vTcl(m,wm,geometry,y)          { {y position}    {}       type    {} {vTcl:wm:conf_geom} }
  209. set vTcl(m,wm,geometry,w)          { width           {}       type    {} {vTcl:wm:conf_geom} }
  210. set vTcl(m,wm,geometry,h)          { height          {}       type    {} {vTcl:wm:conf_geom} }
  211. set vTcl(m,wm,resizable,w)         { {resize width}  {}       boolean {0 1} {vTcl:wm:conf_resize} }
  212. set vTcl(m,wm,resizable,h)         { {resize height} {}       boolean {0 1} {vTcl:wm:conf_resize} }
  213. set vTcl(m,wm,minsize,x)           { {x minsize}     {}       type    {} {vTcl:wm:conf_minmax} }
  214. set vTcl(m,wm,minsize,y)           { {y minsize}     {}       type    {} {vTcl:wm:conf_minmax} }
  215. set vTcl(m,wm,maxsize,x)           { {x maxsize}     {}       type    {} {vTcl:wm:conf_minmax} }
  216. set vTcl(m,wm,maxsize,y)           { {y maxsize}     {}       type    {} {vTcl:wm:conf_minmax} }
  217. set vTcl(m,wm,state)               { state           {}       choice  {iconify deiconify withdraw} {vTcl:wm:conf_state} }
  218. set vTcl(m,wm,title)               { title           {}       type    {} {vTcl:wm:conf_title} }
  219.  
  220. set vTcl(m,menebar,list) ""
  221. set vTcl(m,menubar,extlist) ""
  222.  
  223. #
  224. # Widget Attributes
  225. #
  226. set vTcl(opt,list) "
  227.     -background
  228.     -foreground
  229.     -activebackground
  230.     -activeforeground
  231.     -highlightbackground
  232.     -highlightcolor
  233.     -selectcolor
  234.     -selectbackground
  235.     -selectforeground
  236.     -disabledforeground
  237.     -insertbackground
  238.     -troughcolor
  239.  
  240.     -activerelief
  241.     -relief
  242.     -sliderrelief
  243.  
  244.     -bordermode
  245.     -borderwidth
  246.     -elementborderwidth
  247.     -insertborderwidth
  248.     -selectborderwidth
  249.     -highlightthickness
  250.     -padx
  251.     -pady
  252.  
  253.     -height
  254.     -width
  255.     -orient
  256.     -insertwidth
  257.  
  258.     -bitmap
  259.     -cursor
  260.     -image
  261.     -selectimage
  262.  
  263.     -command
  264.     -xscrollcommand
  265.     -yscrollcommand
  266.  
  267.     -text
  268.     -textvariable
  269.     -font
  270.     -justify
  271.     -wrap
  272.     -wraplength
  273.     -spacing1
  274.     -spacing2
  275.     -spacing3
  276.     -closeenough
  277.     -underline
  278.     -aspect
  279.     -anchor
  280.     -tabs
  281.     -insertofftime
  282.     -insertontime
  283.  
  284.     -exportselection
  285.     -indicatoron
  286.     -label
  287.     -repeatdelay
  288.     -repeatinterval
  289.     -tickinterval
  290.     -jump
  291.     -showvalue
  292.     -resolution
  293.     -from
  294.     -to
  295.  
  296.     -confine
  297.     -menu
  298.     -selectmode
  299.     -setgrid
  300.  
  301.     -variable
  302.     -offvalue
  303.     -onvalue
  304.     -value
  305.  
  306.     -screen
  307.     -show
  308.     -state
  309.     -takefocus
  310.  
  311.     -sliderlength
  312.     -scrollregion
  313.     -xscrollincrement
  314.     -yscrollincrement
  315. "
  316.  
  317. set vTcl(opt,-activebackground)    { {active bg}     Colors   color   {} }
  318. set vTcl(opt,-activeforeground)    { {active fg}     Colors   color   {} }
  319. set vTcl(opt,-activerelief)        { {active relief} {}       choice  {flat groove raised ridge sunken} }
  320. set vTcl(opt,-anchor)              { anchor          {}       choice  {n ne e se s sw w nw center} }
  321. set vTcl(opt,-aspect)              { aspect          {}       type    {} }
  322. set vTcl(opt,-bd)                  { {borderwidth}   {}       type    {} }
  323. set vTcl(opt,-borderwidth)         { {borderwidth}   {}       type    {} }
  324. set vTcl(opt,-bg)                  { background      {}       color   {} }
  325. set vTcl(opt,-background)          { background      {}       color   {} }
  326. set vTcl(opt,-bitmap)              { bitmap          {}       type    {} }
  327. set vTcl(opt,-bordermode)          { {border mode}   {}       choice  {inside ignore outside} }
  328. set vTcl(opt,-closeenough)         { closeness       {}       type    {} }
  329. set vTcl(opt,-command)             { command         {}       command {} }
  330. set vTcl(opt,-confine)             { confine         {}       boolean {0 1} }
  331. set vTcl(opt,-cursor)              { cursor          {}       type    {} }
  332. set vTcl(opt,-disabledforeground)  { {disabled fg}   Colors   color   {} }
  333. set vTcl(opt,-elementborderwidth)  { {element bd}    {}       type    {} }
  334. set vTcl(opt,-exportselection)     { export          {}       boolean {0 1} }
  335. set vTcl(opt,-fg)                  { foreground      Colors   color   {} }
  336. set vTcl(opt,-foreground)          { foreground      Colors   color   {} }
  337. set vTcl(opt,-font)                { font            {}       type    {} }
  338. set vTcl(opt,-height)              { height          {}       type    {} }
  339. set vTcl(opt,-highlightbackground) { {hilight bg}    Colors   color   {} }
  340. set vTcl(opt,-highlightcolor)      { {hilight color} Colors   color   {} }
  341. set vTcl(opt,-highlightthickness)  { {hilight bd}    {}       type    {} }
  342. set vTcl(opt,-image)               { image           {}       type    {} }
  343. set vTcl(opt,-indicatoron)         { indicator       {}       boolean {0 1} }
  344. set vTcl(opt,-insertbackground)    { {insert bg}     Colors   color   {} }
  345. set vTcl(opt,-insertborderwidth)   { {insert bd}     {}       type    {} }
  346. set vTcl(opt,-insertofftime)       { {insert off time} {}     type    {} }
  347. set vTcl(opt,-insertontime)        { {insert on time} {}      type    {} }
  348. set vTcl(opt,-insertwidth)         { {insert wd}     {}       type    {} }
  349. set vTcl(opt,-jump)                { jump            {}       boolean {0 1} }
  350. set vTcl(opt,-justify)             { justify         {}       choice  {left right center} }
  351. set vTcl(opt,-menu)                { menu            {}       menu    {} }
  352. set vTcl(opt,-offvalue)            { {off value}     {}       type    {} }
  353. set vTcl(opt,-onvalue)             { {on value}      {}       type    {} }
  354. set vTcl(opt,-orient)              { orient          {}       choice  {vertical horizontal} }
  355. set vTcl(opt,-padx)                { {x pad}         {}       type    {} }
  356. set vTcl(opt,-pady)                { {y pad}         {}       type    {} }
  357. set vTcl(opt,-relief)              { relief          {}       choice  {flat groove raised ridge sunken} }
  358. set vTcl(opt,-repeatdelay)         { {repeat delay}  {}       type    {} }
  359. set vTcl(opt,-repeatinterval)      { {repeat intrvl} {}       type    {} }
  360. set vTcl(opt,-screen)              { screen          {}       type    {} }
  361. set vTcl(opt,-scrollregion)        { {scroll region} {}       type    {} }
  362. set vTcl(opt,-selectbackground)    { {select bg}     Colors   color   {} }
  363. set vTcl(opt,-selectborderwidth)   { {select bd}     {}       type    {} }
  364. set vTcl(opt,-selectcolor)         { {select color}  Colors   color   {} }
  365. set vTcl(opt,-selectforeground)    { {select fg}     Colors   color   {} }
  366. set vTcl(opt,-selectimage)         { {select image}  {}       type    {} }
  367. set vTcl(opt,-selectmode)          { {select mode}   {}       type    {} }
  368. set vTcl(opt,-setgrid)             { {set grid}      {}       boolean {0 1} }
  369. set vTcl(opt,-show)                { show            {}       type    {} }
  370. set vTcl(opt,-showvalue)           { {show value}    {}       boolean {0 1} }
  371. set vTcl(opt,-sliderlength)        { {slider length} {}       type    {} }
  372. set vTcl(opt,-sliderrelief)        { {slider relief} {}       choice  {flat groove raised ridge sunken} }
  373. set vTcl(opt,-spacing1)            { spacing1        {}       type    {} }
  374. set vTcl(opt,-spacing2)            { spacing2        {}       type    {} }
  375. set vTcl(opt,-spacing3)            { spacing3        {}       type    {} }
  376. set vTcl(opt,-state)               { state           {}       choice  {normal active disabled} }
  377. set vTcl(opt,-tabs)                { tabs            {}       type    {} }
  378. set vTcl(opt,-takefocus)           { {take focus}    {}       type    {} }
  379. set vTcl(opt,-text)                { text            {}       type    {} }
  380. set vTcl(opt,-textvariable)        { {text var}      {}       type    {} }
  381. set vTcl(opt,-tickinterval)        { {tic interval}  {}       type    {} }
  382. set vTcl(opt,-from)                { {from value}    {}       type    {} }
  383. set vTcl(opt,-to)                  { {to value}      {}       type    {} }
  384. set vTcl(opt,-label)               { label           {}       type    {} }
  385. set vTcl(opt,-resolution)          { resolution      {}       type    {} }
  386. set vTcl(opt,-troughcolor)         { {trough color}  Colors   color   {} }
  387. set vTcl(opt,-underline)           { underline       {}       type    {} }
  388. set vTcl(opt,-value)               { value           {}       type    {} }
  389. set vTcl(opt,-variable)            { variable        {}       type    {} }
  390. set vTcl(opt,-width)               { width           {}       type    {} }
  391. set vTcl(opt,-wrap)                { wrap            {}       choice  {char none word} }
  392. set vTcl(opt,-wraplength)          { {wrap length}   {}       type    {} }
  393. set vTcl(opt,-xscrollincrement)    { {x increment}   {}       type    {} }
  394. set vTcl(opt,-yscrollincrement)    { {y increment}   {}       type    {} }
  395. set vTcl(opt,-xscrollcommand)      { {x scroll cmd}  {}       command {} }
  396. set vTcl(opt,-yscrollcommand)      { {y scroll cmd}  {}       command {} }
  397.  
  398. set vTcl(head,proj) [string trim {
  399. #############################################################################
  400. # Visual Tcl v$vTcl(version) Project
  401. #
  402. }]
  403.  
  404. set vTcl(head,vars) [string trim {
  405. #################################
  406. # GLOBAL VARIABLES
  407. #
  408. }]
  409.  
  410. set vTcl(head,procs) [string trim {
  411. #################################
  412. # USER DEFINED PROCEDURES
  413. #
  414. }]
  415.  
  416. set vTcl(head,gui) [string trim {
  417. #################################
  418. # VTCL GENERATED GUI PROCEDURES
  419. #
  420. }]
  421.  
  422. set vTcl(head,proc,widgets) "$vTcl(tab)###################
  423. $vTcl(tab)# CREATING WIDGETS
  424. $vTcl(tab)###################
  425. "
  426.  
  427. set vTcl(head,proc,geometry) "$vTcl(tab)###################
  428. $vTcl(tab)# SETTING GEOMETRY
  429. $vTcl(tab)###################
  430. "
  431.  
  432.